
#include "area.h"
#include "avatar.h"
#include "commands-pedit.h"
#include "commandTable.h"
#include "commandTable-default.h"
#include "display.h"
#include "handler.h"
#include "room.h"
#include "symphony.h"
#include "world.h"

/*
PCmd::PCmd( void ) {
  setName( "" );
  return;
}

bool PCmd::execute( Creature* creature, const std::string& args ) {

  return true;
}
*/

PCmdColor::PCmdColor( void ) {
  name( "color" );
  level( CREATOR );
  return;
}

bool PCmdColor::execute( Creature* creature, const std::string& args ) {
  Avatar* avatar = (Avatar*)creature;
  Avatar* target = (Avatar*)avatar->pedit();

  if ( args.empty() ) {
    creature->send( "Please specify a color code (\"Y\", \"g\", \"w\", etc...)" );
    return false;
  }

  target->gechoColor( args[args.find_first_not_of(' ')] );
  target->send( "Your {%cgecho color {xhas been reset!", target->gechoColor() );
  avatar->send( "You have reset %s's {%cgecho color{x!", target->name().c_str(), target->gechoColor() );

  return true;
}

